package com.fishbone.cloud.auth.security.config;

import org.bouncycastle.jcajce.provider.asymmetric.rsa.KeyPairGeneratorSpi;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.security.KeyPair;

/**
 * Token加密配置
 * @ClassName KeyConfig
 * @Author huyaxi
 * @DATE 2019/7/29 15:42
 */
@Configuration
public class KeyConfig {

    @Bean(name = "spiKeyPair")
    KeyPair keyPair(){
        KeyPairGeneratorSpi generatorSpi = new KeyPairGeneratorSpi();
        return generatorSpi.generateKeyPair();
    }
}
